home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: neumann.uwaterloo.ca!hylo
- From: hylo@neumann.uwaterloo.ca (Grace Hai Yan Lo)
- Subject: How to convert char to hex in C++?
- Sender: news@undergrad.math.uwaterloo.ca (news spool owner)
- Message-ID: <DM679K.BD1@undergrad.math.uwaterloo.ca>
- Date: Fri, 2 Feb 1996 22:46:32 GMT
- Nntp-Posting-Host: neumann.uwaterloo.ca
- Organization: University of Waterloo
- Keywords: hex
-
- I just wonder if anyone know how to convert a char (e.g. 'a') to
- hex digit (i.e. 61 for 'a') in C++? Somehow the cout << hex << n <<endl;
- works for n being an integer but not a character. Thanks.
-
-
- Grace Lo
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ! Grace Hai Yan Lo % email : hylo@neumann.uwaterloo.ca !
- ! Department of Computer Science % Office : DC3511, U. of W. !
- ! University of Waterloo % Tel. no. : (519) 888-4567 ext 3512 !
- ! Waterloo ONT % Program : Master in Computer Science!
- ! N2L 3G1 Canada % Research : Mobile Computing !
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-